import request from '@/router/axios';

/**
 * 租户列表数据
 *
 */
export const getList = (current, size, params) => {
  return request({
    url: '/tenant/tenant/page',
    method: 'POST',
    params: {
      ...params,
      current,
      size,
    }
  })
}

//租户唯一性校验
export const verifyUnique = (data) => request({
  url: '/tenant/tenant/verifyUnique',
  method: 'post',
  params: data
})

/**
 * 添加租户
 * @param row
 */
export const add = (row) => {
  return request({
    url: '/tenant/tenant/add',
    method: 'post',
    data: row
  })
}

/**
 * 更新租户
 * @param row
 */
export const update = (row) => {
  return request({
    url: '/tenant/tenant/update',
    method: 'post',
    data: row
  })
}

/**
 * 删除字典项
 * @param row
 */
export const remove = (row) => {
  return request({
    url: '/tenant/tenant/remove',
    method: 'post',
    data: row
  })
}